﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;

public partial class reenableProfile : AbstractPage {
	protected void Page_Load(object sender, EventArgs e) {

	}

	protected void btnSubmit_Click(object sender, EventArgs e) {
		IProfileService profileService = new ProfileServiceImpl();
		try {
			profileService.reenableAccount(this.txtEmail.Text, this.txtAnswer.Text);

			this.addMessage(new Message(Message.Type.INFO, this.txtEmail.Text + " reenabled!"));
			this.Server.Transfer("index.aspx", true);
		} catch (BusinessException be) {
			this.addMessages(be);
		} catch (ServiceException se) {
			this.addMessage(se);
		}
	}

	protected void btnCancel_Click(object sender, EventArgs e) {
		Response.Redirect("index.aspx");
	}
}
